<template>
	<view class="content">
		<my-info @get-login="getLogin()"></my-info>
		<!-- <my-service></my-service> -->
		<my-article ref="myArticle"></my-article>
		
	</view>
</template>

<script>
import myInfo from './my-info/my-info.vue'
// import myService from './my-service/my-service.vue'
import myArticle from './my-article/my-article.vue'

export default {
	components:{
		myInfo,
		// myService,
		myArticle
	},
	data() {
		return {
			title: 'Hello'
		};
	},
	onLoad() {
		
	},
	onShow(){
		this.checkLogin();
	},
	methods: {
		checkLogin(){
			let userInfo = uni.getStorageSync("user_info");
			if(userInfo == '' || userInfo == null){
				uni.showToast({
					title: '请登录后进行使用',
					icon: 'none'	
				});
				return;
			}
			if(userInfo.mobile == '' || userInfo.mobile == null){
				uni.showToast({
					title: '请绑定手机号',
					icon: 'none'	
				});
				return;
			}
		},
		getLogin(){
			this.$refs.myArticle.loadData();
		}
	}
};
</script>

<style>
.content {
	height: 100%;
	width: 100%;
}
</style>
